package com.apobates.jforum2.troll.regular.event;

import com.apobates.jforum2.troll.regular.ActionOperatorLog;
import com.google.gson.Gson;
import java.time.LocalDateTime;

/**
 * 话题移动事件
 * 事件主题: topic.event.move
 * @author xiaofanku
 * @since 20200520
 */
public class TopicMoveLog implements ActionOperatorLog {
    //要移动的话题
    private long id;
    private String title;
    //话题的作者
    private long memberId;
    private String memberNickname;
    //移动至的新版块
    private long board;
    //现在的访问地址
    private String link;
    //管理员
    private String managerNickname;
    private long manager;
    //操作的日期
    private LocalDateTime dateTime;

    public TopicMoveLog() {
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public long getMemberId() {
        return memberId;
    }

    public void setMemberId(long memberId) {
        this.memberId = memberId;
    }

    public String getMemberNickname() {
        return memberNickname;
    }

    public void setMemberNickname(String memberNickname) {
        this.memberNickname = memberNickname;
    }

    public long getBoard() {
        return board;
    }

    public void setBoard(long board) {
        this.board = board;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    public long getManager() {
        return manager;
    }

    public void setManager(long manager) {
        this.manager = manager;
    }

    public String getManagerNickname() {
        return managerNickname;
    }

    public void setManagerNickname(String managerNickname) {
        this.managerNickname = managerNickname;
    }

    public LocalDateTime getDateTime() {
        return dateTime;
    }

    public void setDateTime(LocalDateTime dateTime) {
        this.dateTime = dateTime;
    }

    @Override
    public String getPayload() {
        return new Gson().toJson(this);
    }

    @Override
    public String getBindingNames() {
        return "topicMoveAction";
    }
}
